package com.developer.platform.application.query.dto;

import com.veeker.core.bean.TreeNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author ：qiaoliang
 * @date ：2020-11-09
 */
public class RouteDto extends TreeNode {
    @ApiModelProperty(value = "路由地址")
    private String path;
    @ApiModelProperty(value = "路由路径")
    private String component;
    @ApiModelProperty(value = "路由名称")
    private String name;
    @ApiModelProperty(value = "路由描述")
    private Meta meta;
    @ApiModelProperty(value = "重定向地址")
    private String redirect;

    public RouteDto(Long id, Long parentId) {
        super(id, parentId);
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Meta getMeta() {
        return meta;
    }
    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    public String getRedirect() {
        return redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }

    @ApiModel("登录用户资源描述返回模型")
    public static class Meta {
        @ApiModelProperty(value = "路由标题")
        private String title;
        @ApiModelProperty(value = "路由图标")
        private String icon;

        public Meta(String title, String icon) {
            this.icon = icon;
            this.title = title;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }
    }

}
